# 作业1
def num_sum(*agrs):
    result = 0
    for i in agrs:
        if i % 2 == 0:
            result += i
    return result


result1 = num_sum(1, 2, 3, 4, 5, 6, 7, 8)
print(result1)
# 作业2
score_list = [74, 86, 92, 58, 60]


def average_score(scores):
    return sum(scores) / len(scores)


result2 = average_score(score_list)
print(result2)
# 作业3
evaluate_list = ['满意', '一般', '不满意', '一般', '一般', '非常满意', '满意', '不满意', '非常满意', '满意', '不满意',
                  '满意', '不满意', '非常满意']


def evaluate_count(evaluate):
    new_evaluate_list = list(set(evaluate))
    evaluate_dict = {i: evaluate.count(i) for i in new_evaluate_list}
    return evaluate_dict


result3 = evaluate_count(evaluate_list)
print(result3)

def evaluate_count(evaluate):
    count_dict = {}
    for evaluation in evaluate:
        if evaluation in count_dict:
            count_dict[evaluation] += 1
        else:
            count_dict[evaluation] = 1
    return count_dict


evaluate_list = ['满意', '一般', '不满意', '一般', '一般', '非常满意', '满意', '不满意', '非常满意', '满意', '不满意',
                 '满意', '不满意', '非常满意']
result4 = evaluate_count(evaluate_list)
print(result4)